/* 
 *  Copyright (c) 2011—2013 Panguso.com. All rights reserved. 
 *  File Name:  TimeUtil.java                                      
 *  File Contents Outline : 时间实体类
 *  File  Create Date:   2012年7月30日
 *  File Version#: Revision#: #1                  
 *  File  Latest Modify Date : 2013年1月16日
 *  File Author :  bachuan@panguso.com
 */

package storage.util;

import java.util.Calendar;


public class TimeUtil {
    public static String getTime(){
        StringBuilder sb = new StringBuilder("");
        Calendar calendar = Calendar.getInstance();
        sb.append(calendar.get(Calendar.YEAR));
        sb.append("-");
        sb.append(1+calendar.get(Calendar.MONTH));
        sb.append("-");
        sb.append(calendar.get(Calendar.DATE));
        sb.append(" ");
        sb.append(calendar.get(Calendar.HOUR_OF_DAY));
        sb.append(":");
        sb.append(calendar.get(Calendar.MINUTE));
        sb.append(":");
        sb.append(calendar.get(Calendar.SECOND));
        return sb.toString();
    }
}
